Subject: Re: Systemtime
From: Keith Hill <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Mon, 3 Mar 97 00:25:13 GMT

To the one known as Reine,

> How do I get the systemtime in AMOS? Example code _please_

See below.
 _   _   _        _     _   _     |  
|_> |_| |_| |\ | |_ |  | | /   |  |  Zik-Zak: "We make everything you need
|_> | \ | | | \| |_ |_ |_| \_  .  |  and you need everything we make."
                                  |  
                    --------------+---------------
                     http://www.mirex.demon.co.uk

'************************************* 
'*             Time.AMOS             * 
'*     1992 by Volker Stepprath     * 
'*  Shows the actual time of system  * 
'************************************* 
'
'**** Install buffer ****
'
N$=Space$(12)+Chr$(0)
'
'**** Get time of system ****
'
Dreg(1)=Varptr(N$)
XDATESTAMP=Doscall(-192)
'
'**** Calculate and show time **** 
'
H=Leek(Varptr(N$)+4)
S=Leek(Varptr(N$)+8)/50
M=H mod 60
H=H/60
H$="00" : Right$(H$,Len(Str$(H))-1)=Str$(H)-" "
M$="00" : Right$(M$,Len(Str$(M))-1)=Str$(M)-" "
S$="00" : Right$(S$,Len(Str$(S))-1)=Str$(S)-" "
Print H$+":"+M$+":"+S$
'
End